package com.zbkc.bean;

import org.json.JSONObject;

import com.zbkc.util.BASE64Util;
import com.zbkc.util.JSONUtil;
import com.zbkc.util.LogUtil;

public class LoginBean {

	private String deviceId;
	private String otherMessage;
	private String userId;

	public LoginBean(String paramString1, String paramString2,
			String paramString3) {
		this.userId = paramString1;
		this.otherMessage = paramString2;
		this.deviceId = paramString3;
	}

	public static LoginBean createFormJSONObject(JSONObject paramJSONObject) {
		String str1 = BASE64Util.byteToString(BASE64Util.decode(JSONUtil
				.getString(paramJSONObject, "w")));
		String str2 = BASE64Util.byteToString(BASE64Util.decode(JSONUtil
				.getString(paramJSONObject, "e")));
		LogUtil.e("message:" + str2);
		return new LoginBean(str1, str2, BASE64Util.byteToString(BASE64Util
				.decode(JSONUtil.getString(paramJSONObject, "n"))));
	}

	public String getDeviceId() {
		return this.deviceId;
	}

	public String getOtherMessage() {
		return this.otherMessage;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setDeviceId(String paramString) {
		this.deviceId = paramString;
	}

	public void setOtherMessage(String paramString) {
		this.otherMessage = paramString;
	}

	public void setUserId(String paramString) {
		this.userId = paramString;
	}

}
